<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui"
      xmlns:pe="http://primefaces.org/ui/extensions">
    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value=""></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
             <pe:timeline id="timeline" value="#{customTimelineController.model}"  
             editable="true" eventMargin="10" eventMarginAxis="0"  
             locale="#{customTimelineController.locale}"  
             start="#{customTimelineController.start}"  
             end="#{customTimelineController.end}"  
             showNavigation="true" showButtonNew="true"  
             axisOnTop="true" />  
              
<h:panelGrid columns="2" style="margin-top:15px" cellpadding="5">  
    <h:outputText value="Select your Locale: "/>  
    <p:selectOneButton value="#{customTimelineController.locale}">  
        <f:selectItem itemLabel="English" itemValue="en"/>  
        <f:selectItem itemLabel="German" itemValue="de"/>  
        <f:selectItem itemLabel="Russian" itemValue="ru"/>  
        <f:selectItem itemLabel="Spanish" itemValue="es"/>  
        <f:selectItem itemLabel="Catalan" itemValue="ca"/>  
        <p:ajax event="change" update="timeline"/>  
    </p:selectOneButton>    
</h:panelGrid>     
                      
            </h:form>
        </ui:define>
    </ui:composition>

</html>
